using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Adge.Common;

namespace Adge.Web.UI
{
    public partial class adge : BaseMasterPage
    {
        private static readonly string startIP = ConfigurationManager.AppSettings["startIP"];
        private static readonly string endIP = ConfigurationManager.AppSettings["endIP"];
        private const string REMOTE_ADDR = "REMOTE_ADDR";        

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblDateTime.Text = DateTime.Now.ToString("dddd, yyyy-MM-dd");
            }
            if (Request.IsAuthenticated)
            {
                lblWelcome.Text = HttpContext.Current.User.Identity.Name;
            }
            if (!Utils.CheckValidateIP(startIP, endIP, Request.ServerVariables[REMOTE_ADDR]))
            {
                lgnStatus.Visible = false;
            }
        }        

    }
}
